package entity;



import java.io.Serializable;
import java.util.Date;
import java.util.Objects;


public class codeCheck implements Serializable {
    private String phoneNumber;
    private Date date;
    private String username;
    private String password;

    public codeCheck() {
    }

    public codeCheck(String phoneNumber, Date date, String username, String password) {
        this.phoneNumber = phoneNumber;
        this.date = date;
        this.username = username;
        this.password = password;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass())
            return false;
        codeCheck codeCheck = (codeCheck) o;
        return Objects.equals(phoneNumber, codeCheck.phoneNumber) && Objects.equals(date, codeCheck.date) && Objects.equals(username, codeCheck.username);
    }

    @Override
    public int hashCode() {
        return Objects.hash(phoneNumber, date, username);
    }

    /**
     * 获取
     * @return phoneNumber
     */
    public String getPhoneNumber() {
        return phoneNumber;
    }

    /**
     * 设置
     * @param phoneNumber
     */
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    /**
     * 获取
     * @return date
     */
    public Date getDate() {
        return date;
    }

    /**
     * 设置
     * @param date
     */
    public void setDate(Date date) {
        this.date = date;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    public String toString() {
        return "codeCheck{phoneNumber = " + phoneNumber + ", date = " + date + ", username = " + username + ", password = " + password + "}";
    }
}
